home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Development Libraries / SGI IRIX 6.2 Development Libraries.iso / dist / gl_dev.idb / usr / share / src / OpenGL / demos / stonehenge / atmosphere.h.z / atmosphere.h
Encoding:
C/C++ Source or Header  |  1996-03-15  |  1.1 KB  |  53 lines

  1. #ifndef ATMOSPHERE_H
  2. #define ATMOSPHERE_H
  3.  
  4. #ifndef ATMOSPHERE_EXTERN
  5. #define ATMOSPHERE_EXTERN extern
  6. #endif
  7.  
  8. #include "Color.h"
  9. #include "Point.h"
  10.  
  11. const int weather_max_name = 64;
  12. class Weather {
  13.  public:
  14.   Weather();
  15.   Weather(const char *n, GLfloat fd, GLfloat fs = 1, Color fc = white, 
  16.       Color s1 = blue, Color s2 = white,
  17.       GLfloat sb = 1,
  18.       GLenum ls = GL_LIGHT0, GLenum la = GL_LIGHT1);
  19.   ~Weather();
  20.  
  21.   Weather operator=(Weather a);
  22.  
  23.   /* The sun position is used to determine how light / dark it is */
  24.   void apply(Point sun);
  25.   void draw_sky(Point sun);
  26.  
  27.   /* This is how much to blur shadows due to haze or fog */
  28.   GLfloat shadow_blur();
  29.  
  30.   char name[weather_max_name];
  31.  
  32.   GLfloat fog_density;
  33.   Color fog_color;
  34.   /* Fog spread relates the height to the density of the fog -- 1.0
  35.    * leads to uniform fog */
  36.   GLfloat fog_spread;
  37.  
  38.   Color sky_top;
  39.   Color sky_bottom;
  40.  
  41.   GLenum light_sun, light_ambient;
  42.   GLfloat sun_brightness;
  43.  
  44.  private:
  45. };
  46. const int nweathers = 4;
  47. extern Weather weathers[nweathers];
  48. const int def_weather_index = 0;
  49.  
  50. #undef ATMOSPHERE_EXTERN
  51.  
  52. #endif
  53.